<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录成功</title>
</head>

<body>
    <div></div>
    <script>
        // location.search会获得一参数带了一个?
        var div = document.querySelector('div');
        var search = location.search.substr(1); //substr(从第几个开始，到第几个结束)是字符串切割，放上参数是将第一个字符切割掉，一直到字符串末尾
        var S = search.split('='); //在=符号处分割，会返回数组
        div.innerHTML = S[1] + '欢迎你'; //上一个页面必须输入英文否者会出现乱码,但有解决方案
    </script>
</body>

</html>